<?php

require_once (EXECUTOR_PATH . '/config/params.php');

// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
$executor_config = array(
	'basePath'=> EXECUTOR_PATH,
	'name'=>'Qihoo Data Warehouse',

	// preloading 'log' component
	'preload'=>array('log'),

	// autoloading model and component classes
	'import'=>array(
        'root.common.components.*',
		'root.common.dal.*',
		'root.common.models.*',
		'root.common.utils.*',
	),

    // application components
	'components'=>array(
		'db'=>array(
			'connectionString' => 'mysql:host=client05v.safe.zzbc.qihoo.net;dbname=dw',
			'emulatePrepare' => true,
            'enableParamLogging' =>  true,
            'enableProfiling' => true,
			'username' => 'dw',
			'password' => 'dwcloud360',
			'charset' => 'utf8',
		),
		'dwmart'=>array(
			'connectionString' => 'mysql:host=client05v.safe.zzbc.qihoo.net;dbname=dw_mart',
			'emulatePrepare' => true,
            'enableParamLogging' =>  true,
            'enableProfiling' => true,
			'username' => 'dw',
			'password' => 'dwcloud360',
			'charset' => 'utf8',
			'class' => 'system.db.CDbConnection',
		),
		'log'=>array(
			'class'=>'CLogRouter',
			'routes'=>array(
                array(
					'class'=>'CRealTimeFileLogRoute',
                    'maxFileSize' => 1024 * 1024,
                    'maxLogFiles' => 10,
                    'logPath' => LOG_PATH,
                    'logFile' => 'executor.sql.log',
                    'categories'=> 'system.db.*',
					'levels'=>'trace, profile',
				),
    			array(
					'class'=>'CRealTimeFileLogRoute',
                    'maxFileSize' => 1024 * 1024,
                    'maxLogFiles' => 10,
                    'logPath' => LOG_PATH,
                    'logFile' => 'executor.log',
					'levels'=>'info',
                ),
     			array(
					'class'=>'CRealTimeFileLogRoute',
                    'maxFileSize' => 1024 * 1024,
                    'maxLogFiles' => 10,
                    'logPath' => LOG_PATH,
                    'logFile' => 'executor.log.wf',
					'levels'=>'error, warning',
                ),
           ),
		),
	),

	// application-level parameters that can be accessed
	// using Yii::app()->params['paramName']
	'params'=>array(
		// this is used in contact page
		'adminEmail'=>'webmaster@example.com',
	),
);
